<!DOCTYPE html>



  


<html class="theme-next pisces use-motion" lang="">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/blog/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/blog/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/blog/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/blog/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/blog/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/blog/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/blog/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="Hexo, NexT" />










<meta name="description" content="###Java Design Pattern(设计模式)根据设计模式的参考书 Design Patterns - Elements of Reusable Object-Oriented Software（中文译名：设计模式 - 可复用的面向对象软件元素） 中所提到的，总共有 23 种设计模式。这些模式可以分为三大类：创建型模式（Creational Patterns）、结构型模式（Structu">
<meta name="keywords" content="Android、iOS、Web、React Native">
<meta property="og:type" content="article">
<meta property="og:title" content="Java-Design-Pattern(设计模式)">
<meta property="og:url" content="http://yoursite.com/blog/2018/08/06/Java-Design-Pattern/Java-Design-Pattern(设计模式)/index.html">
<meta property="og:site_name" content="凌浩雨_博客">
<meta property="og:description" content="###Java Design Pattern(设计模式)根据设计模式的参考书 Design Patterns - Elements of Reusable Object-Oriented Software（中文译名：设计模式 - 可复用的面向对象软件元素） 中所提到的，总共有 23 种设计模式。这些模式可以分为三大类：创建型模式（Creational Patterns）、结构型模式（Structu">
<meta property="og:locale" content="default">
<meta property="og:updated_time" content="2018-08-06T10:42:14.957Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Java-Design-Pattern(设计模式)">
<meta name="twitter:description" content="###Java Design Pattern(设计模式)根据设计模式的参考书 Design Patterns - Elements of Reusable Object-Oriented Software（中文译名：设计模式 - 可复用的面向对象软件元素） 中所提到的，总共有 23 种设计模式。这些模式可以分为三大类：创建型模式（Creational Patterns）、结构型模式（Structu">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/blog/',
    scheme: 'Pisces',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: 'Author'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/blog/2018/08/06/Java-Design-Pattern/Java-Design-Pattern(设计模式)/"/>





  <title>Java-Design-Pattern(设计模式) | 凌浩雨_博客</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="default">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/blog/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">凌浩雨_博客</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/blog/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            Home
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/blog/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            Archives
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/blog/blog/2018/08/06/Java-Design-Pattern/Java-Design-Pattern(设计模式)/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="凌浩雨">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/images/avatar.jpeg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="凌浩雨_博客">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">Java-Design-Pattern(设计模式)</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Posted on</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2018-08-06T18:01:39+08:00">
                2018-08-06
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>###Java Design Pattern(设计模式)<br>根据设计模式的参考书 Design Patterns - Elements of Reusable Object-Oriented Software（中文译名：设计模式 - 可复用的面向对象软件元素） 中所提到的，总共有 23 种设计模式。这些模式可以分为三大类：创建型模式（Creational Patterns）、结构型模式（Structural Patterns）、行为型模式（Behavioral Patterns）。当然，我们还会讨论另一类设计模式：J2EE 设计模式。<br><a id="more"></a></p>
<table>
<thead>
<tr>
<th>序号</th>
<th style="text-align:center">模式 &amp; 描述</th>
<th style="text-align:left">包括</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td style="text-align:center"><strong>创建型模式</strong> <br>这些设计模式提供了一种在<br>创建对象的同时隐藏创建逻<br>辑的方式，而不是使用new<br>运算符直接实例化对象。这<br>使得程序在判断针对某个给<br>定实例需要创建哪些对象时<br>更加灵活。</td>
<td style="text-align:left">- <a href="http://www.jianshu.com/p/b601fdfa8447" target="_blank" rel="noopener">工厂模式</a>（Factory Pattern）<br> - <a href="http://www.jianshu.com/p/03f28de4ac86" target="_blank" rel="noopener">抽象工厂模式</a>（Abstract Factory Pattern）<br> - <a href="http://www.jianshu.com/p/fb952d0140ec" target="_blank" rel="noopener">单例模式</a>（Singleton Pattern）<br> - <a href="http://www.jianshu.com/p/0f69b9d914b6" target="_blank" rel="noopener">建造者模式</a>（Builder Pattern） <br> - <a href="http://www.jianshu.com/p/8b0e12974367" target="_blank" rel="noopener">原型模式</a>（Prototype Pattern）</td>
</tr>
<tr>
<td>2</td>
<td style="text-align:center"><strong>结构型模式</strong><br> 这些设计模式关注类和对象<br>的组合。继承的概念被用来<br>组合接口和定义组合对象获<br>得新功能的方式。</td>
<td style="text-align:left">- <a href="http://www.jianshu.com/p/2f00695ca091" target="_blank" rel="noopener">适配器模式</a>（Adapter Pattern）<br>  - <a href="http://www.jianshu.com/p/e183579781f5" target="_blank" rel="noopener">桥接模式</a>（Bridge Pattern）<br>  - <a href="http://www.jianshu.com/p/35e2c749bd0a" target="_blank" rel="noopener">过滤器模式</a>（Filter、Criteria Pattern）<br>  - <a href="http://www.jianshu.com/p/3101f7e4e053" target="_blank" rel="noopener">组合模式</a>（Composite Pattern）<br>  - <a href="http://www.jianshu.com/p/04e65974bf6b" target="_blank" rel="noopener">装饰器模式</a>（Decorator Pattern）<br>  - <a href="http://www.jianshu.com/p/18e6d173cc26" target="_blank" rel="noopener">外观模式</a>（Facade Pattern）<br>  - <a href="http://www.jianshu.com/p/ead9c5a5c9d0" target="_blank" rel="noopener">享元模式</a>（Flyweight Pattern）<br>  - <a href="http://www.jianshu.com/p/c844da23c28f" target="_blank" rel="noopener">代理模式</a>（Proxy Pattern）</td>
</tr>
<tr>
<td>3</td>
<td style="text-align:center"><strong>行为型模式</strong> <br>这些设计模式特别关注对象<br>之间的通信。</td>
<td style="text-align:left">- <a href="http://www.jianshu.com/p/54aec76d1c35" target="_blank" rel="noopener">责任链模式</a>（Chain of Responsibility Pattern）<br>  - <a href="http://www.jianshu.com/p/e596b49e553b" target="_blank" rel="noopener">命令模式</a>（Command Pattern）<br>  - <a href="http://www.jianshu.com/p/6c0b1e4e9b3b" target="_blank" rel="noopener">解释器模式</a>（Interpreter Pattern）<br>  - <a href="http://www.jianshu.com/p/4d2ced8ecfde" target="_blank" rel="noopener">迭代器模式</a>（Iterator Pattern）<br>  - <a href="http://www.jianshu.com/p/394a13a65cff" target="_blank" rel="noopener">中介者模式</a>（Mediator Pattern）<br>  - <a href="http://www.jianshu.com/p/748c142ee08e" target="_blank" rel="noopener">备忘录模式</a>（Memento Pattern）<br>  - <a href="http://www.jianshu.com/p/1fbc1a8d8ff9" target="_blank" rel="noopener">观察者模式</a>（Observer Pattern）<br>  - <a href="http://www.jianshu.com/p/29bf605605a8" target="_blank" rel="noopener">状态模式</a>（State Pattern）<br>  - <a href="http://www.jianshu.com/p/5f5e5428e4cb" target="_blank" rel="noopener">空对象模式</a>（Null Object Pattern）<br>  - <a href="http://www.jianshu.com/p/b8575ea5f339" target="_blank" rel="noopener">策略模式</a>（Strategy Pattern）<br>  - <a href="http://www.jianshu.com/p/993cfe2093d2" target="_blank" rel="noopener">模板模式</a>（Template Pattern）<br>  - <a href="http://www.jianshu.com/p/d521a36996fe" target="_blank" rel="noopener">访问者模式</a>（Visitor Pattern）</td>
</tr>
<tr>
<td>4</td>
<td style="text-align:center"><strong>J2EE 模式</strong><br>这些设计模式特别关注表示层。</td>
<td style="text-align:left">- <a href="http://www.jianshu.com/p/e150103dcae9" target="_blank" rel="noopener">MVC 模式</a>（MVC Pattern）<br>  - <a href="http://www.jianshu.com/p/c7d2959f8f7e" target="_blank" rel="noopener">业务代表模式</a>（Business Delegate Pattern）<br>  - <a href="http://www.jianshu.com/p/0d8243f88f6d" target="_blank" rel="noopener">组合实体模式</a>（Composite Entity Pattern）<br>  - <a href="http://www.jianshu.com/p/9722c89edcaa" target="_blank" rel="noopener">数据访问对象模式</a>（Data Access Object Pattern）<br>  - <a href="http://www.jianshu.com/p/11cbdc87900c" target="_blank" rel="noopener">前端控制器模式</a>（Front Controller Pattern）<br>  - <a href="http://www.jianshu.com/p/ee98af899323" target="_blank" rel="noopener">拦截过滤器模式</a>（Intercepting Filter Pattern）<br>  - <a href="http://www.jianshu.com/p/b04fdb2d336d" target="_blank" rel="noopener">服务定位器模式</a>（Service Locator Pattern）<br>  - <a href="http://www.jianshu.com/p/67f73fe750a9" target="_blank" rel="noopener">传输对象模式</a>（Transfer Object Pattern）</td>
</tr>
</tbody>
</table>
<p><a href="http://git.oschina.net/zaitingma/codes/8vzx0mgqfka4w15yie3nh46" target="_blank" rel="noopener">示例代码下载</a></p>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/blog/2018/08/06/Java-Design-Pattern/Java-Decorator-Pattern(装饰器模式)/" rel="next" title="Java-Decorator-Pattern(装饰器模式)">
                <i class="fa fa-chevron-left"></i> Java-Decorator-Pattern(装饰器模式)
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/blog/2018/08/06/Java-Design-Pattern/Java-Facade-Pattern(外观模式)/" rel="prev" title="Java-Facade-Pattern(外观模式)">
                Java-Facade-Pattern(外观模式) <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      

      <section class="site-overview-wrap sidebar-panel sidebar-panel-active">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="/blog/images/avatar.jpeg"
                alt="凌浩雨" />
            
              <p class="site-author-name" itemprop="name">凌浩雨</p>
              <p class="site-description motion-element" itemprop="description">专业从事于移动端开发，Android与iOS均有涉及，主做Android开发与React Native开发</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/blog/archives/">
              
                  <span class="site-state-item-count">393</span>
                  <span class="site-state-item-name">posts</span>
                </a>
              </div>
            

            

            

          </nav>

          

          

          
          

          
          

          

        </div>
      </section>

      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2018</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">凌浩雨</span>

  
</div>


  <div class="powered-by">Powered by <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a></div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">Theme &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Pisces</a> v5.1.4</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/blog/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/blog/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/blog/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/blog/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/blog/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/blog/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/blog/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/blog/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  

  

  

</body>
</html>
